<!DOCTYPE html>
<%@ page language="java" pageEncoding="UTF-8"%>
<html>
	<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
	<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>

	<head>
		<c:set var="title" value="个人中心" scope="request" />
		<jsp:include page="/head.jsp" />
	</head>

	<body>
		<c:import url="/header.do?full=1" />
		<div class="col-md-2">
			<c:import url="/left-menu.do" />
		</div>
		<div class="col-md-10 welcome">
			<ol class="breadcrumb">
				<li>
					<a href="user.html">个人中心</a>
				</li>
				<li class="active">欢迎页</li>
			</ol>
			<h1>欢迎进入<spring:message code="sys.name" />个人中心</h1>
			<pre>当前登录用户：${sessionScope.user.userName}（${sessionScope.user.userRealName}）
当前用户角色：${sessionScope.user.roleName}</pre>

			<a style="display: none;" href="manage/#/my/shops-add" class="btn btn-primary _btn">申请店铺</a>
			<a style="display: none;" href="manage/#/my/shops-info" class="btn btn-primary _btn">店铺状态</a>
		</div>
		<jsp:include page="/footer.jsp" />
		<script type="text/javascript">
			let btns = $("._btn");
			$.get(
				"shops/apply.do",
				function(data) {
					console.info(data);
					if(data.shops != null) {
						btns.eq(1).show();
					} else if(data.roleId == 0) {
						btns.eq(0).show();
					}
				}, "json"
			);
		</script>
	</body>

</html>